<template>
	<view class="content">
		<view class="content-title yangsf-m-t-60">
			<view class="content-title-main">
				您好,
			</view>
			<view class="content-title-text">
				欢迎使用友橙信
			</view>
		</view>
		<view class="yangsf-ratio-w-80 yangsf-m-t-100">
			<u-button type="primary" shape="circle" text="微信登录" @click="wxLogin"></u-button>
		</view>
		<!-- <view class="yangsf-ratio-w-60 yangsf-m-t-30">
			<u-button type="info" shape="circle" text="账号登录" @click="toLogin"></u-button>
		</view> -->
	</view>
</template>

<script>
	import {
		appId,
		callbackUrl
	} from '@/config/config.js'
	export default {
		data() {
			return {}
		},
		methods: {
			wxLogin() {
				let url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId +
					'&redirect_uri=' + encodeURIComponent(callbackUrl) +
					'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect';
				window.location.href = url
			},
			toLogin() {
				uni.$u.route({
					url: '/pages/userCenter/userLogin'
				});
			}
		}
	}
</script>

<style scoped>
	.content {
		margin: auto;
		width: 80%;
		padding: 20px;

		display: flex;
		flex-direction: column;
		align-items: center;
		justify-items: center;
	}

	.content-title {
		width: 100%;
		height: 200px;
	}

	.content-title-main {
		font-size: 60rpx;
		font-weight: bold;
	}

	.content-title-text {
		margin-left: 20px;
		margin-top: 10px;
		color: #9D9D9D;
		font-size: 36rpx;
	}

	.myForm {
		margin-top: 60px;
	}

	.myBtn {
		margin-top: 30px;
	}
</style>